package com.hnust.dao;

import com.hnust.domain.CourseGroup;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import com.hnust.domain.Course;
import java.util.List;


/**
 * 课程表的DAO层
 * @author 42
 * @date 2020/10/30
 */
@Mapper
@Repository
public interface CourseDao {
    @Select("select name from course where cou_id = #{cou_id}")
    @ResultType(String.class)
    String getCourse(String cou_id);


	//根据课程代码和学院id获取课程名
	@Select("select name from course where col_id=#{collageId} and cou_number=#{courseNumber}")
	@ResultType(String.class)
	String getCourseNameByCollageIdAndCourseNumber(String collageId, String courseNumber);

	@Select("select cou_number from course where cou_id=#{courseId}")
	@ResultType(String.class)
	String getCourseNumById(String courseId);
}
